/********************************************************************************
 *    Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH    *
 *                                                                              *
 *              This software is distributed under the terms of the             * 
 *              GNU Lesser General Public Licence (LGPL) version 3,             *  
 *                  copied verbatim in the file "LICENSE"                       *
 ********************************************************************************/
#ifndef HITOFUNPACKEDDATA_H
#define HITOFUNPACKEDDATA_H 1

#include <TObject.h>
#include <array>
// #include "TVector3.h"
// #include <map>
// #include <vector>


class TClonesArray;

class HiTofUnpackedData: public TObject 
{

  public:

    /** Default constructor **/
    HiTofUnpackedData();

    /** Standard constructor **/
    HiTofUnpackedData(uint64_t TimeSliceID,
                    uint8_t pxiID, 
                    uint8_t feeID,
                    uint8_t ChannelID,
                    uint16_t TimeOffset,
                    uint32_t CoarseTime,
                    uint16_t FineTime
                    );


    /** Destructor **/
    virtual ~HiTofUnpackedData();

    /** Output to screen **/
    virtual void Print(const Option_t* opt) const;

    /** Getter **/
    // const uint16_t (*GetWaveformData() const)[4096] { return fWaveformData; }
    uint64_t GetTimeSliceID() const { return fTimeSliceID; }
    uint8_t GetPxiID() const { return fPxiID; }
    uint8_t GetFeeID() const { return fFeeID; }
    uint8_t GetChannelID() const { return fChannelId; }
    uint16_t GetTimeOffset() const { return fTimeOffset; }
    uint32_t GetCoarseTime() const { return fCoarseTime; }
    uint16_t GetFineTime() const { return fFineTime; }


  private:
    // Data Members -----------------------
    uint64_t fTimeSliceID{};     // 时间片编号
    uint8_t fPxiID{};              // PXI板号
    uint8_t fFeeID{};              // FEE板号

    uint8_t fChannelId{};                 // 通道号
    uint16_t fTimeOffset{};            // 时间窗口内偏移
    uint32_t fCoarseTime{};            // 粗时间
    uint16_t fFineTime{};              // 细时间


    ClassDef(HiTofUnpackedData, 1)

};

#endif

